/**
 * 
 */
package edu.uc.ui;

import java.util.ArrayList;

import android.content.Context;
import android.graphics.drawable.Drawable;

import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

/**
 * @author Jimmy
 *
 */
public class CustomPinpoint extends ItemizedOverlay<OverlayItem>{
	//array list for the pinpoints
	private ArrayList<OverlayItem> pinpoints = new ArrayList<OverlayItem>();
	@SuppressWarnings("unused")
	private Context context;
	
	/**
	 * method CustomPinpoints
	 * 
	 * @param defaultMarker
	 * 
	 * method to call the custom marker we created
	 */
	public CustomPinpoint(Drawable defaultMarker) {
		super(boundCenter(defaultMarker));
		// TODO Auto-generated constructor stub
	}
	
	/**
	 * method CustomPinpoint
	 * 
	 * @param m
	 * @param c
	 */
	public CustomPinpoint(Drawable m, Context c) {
		this(m);
		context = c;
	}

	/**
	 * method creatItem
	 * 
	 * @param i
	 * 
	 */
	@Override
	protected OverlayItem createItem(int i) {
		// TODO Auto-generated method stub
		return pinpoints.get(i);
	}

	/**
	 * method size
	 * 
	 */
	@Override
	public int size() {
		// TODO Auto-generated method stub
		return pinpoints.size();
	}
	/**
	 * method insertPinpoint
	 * 
	 * @param item
	 */
	public void insertPinpoint(OverlayItem item){
		pinpoints.add(item);
		this.populate();
	}

}
